﻿using System;
using System.IO;
using BCGPSCommon;
using Microsoft.Extensions.Configuration;

namespace BCGPS.DataReceive.Service
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("BCGPS.DataReceive.Service  >> Main() >>");

            new ConfigurationManager();
            SetUp();


            UDPHandle udpHandle = new UDPHandle();
            udpHandle.Init(IPHelper.GetIPAddress(), "53355");
            Console.ReadLine();
            Console.WriteLine("main is over!");
        }

        #region 读取配置文件
        private static void SetUp()
        {
            GeneralContainer.configuration = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                .Build();
        }
        #endregion
    }
}
